<?php

// +----------------------------------------------------------------------
// | ThinkAdmin
// +----------------------------------------------------------------------
// | 版权所有 2014~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目：https://github.com/zoujingli/ThinkAdmin
// +----------------------------------------------------------------------

namespace app\index\controller;

use think\Controller;

/**
 * 课程控制器
 * Class Index
 * @package app\index\controller
 * @author Anyon <zoujingli@qq.com>
 * @date 2017/04/05 10:38
 */
class Course extends Controller
{

    /**
     * 课程列表
     */
    public function index()
    {
        
        $list = Db::table('Videos')->where(['isdelete'=>0])->select();
        $this->assign('list',$list);
        return $this->fetch();
    }

    //详情
    public function read()
    {
        $id = $_GET['id'];
        $video = Db::table('Videos')->where(['isdelete'=>0,'id'=>$id])->find();
        $this->assign('video',$video);
        return $this->fetch();
    }

    

}
